<template>
	<view>
		<view class="operation">
			<view class="left">
				<text>{{priceName}}</text>
				<text>￥</text>
				<text class="price">{{price||0}}</text>
				<!-- <text>{{fromData.sail.orderAmount}}</text> -->
				<!-- <text>已减 ¥{{fromData.sail.discountAmount}}</text> -->
			</view>
			<view class="right">
				<text @click="btnSail" style="margin-right: 45rpx;font-weight: bold;">{{btnName}}</text>
			</view>
		</view>
		<!-- 费用明细 -->
		<u-popup :show="feeShow" @close="close2" overlayStyle="bottom:112rpx"
			customStyle="bottom:0;border-radius:24rpx 24rpx 0 0">
			<view class="feeDetail">
				<view class="tit">
					<text>费用明细</text>
					<u-icon name="close-circle" size="40" color="#999" @click="close2()"></u-icon>
				</view>
				<view class="list">
					<view class="item">
						<view class="top">
							<text>订单金额</text>
							<text>￥{{price}}</text>
						</view>
					</view>
					<view class="item">
						<view class="top">
							<text>退款手续费</text>
						</view>
						<view class="bottom">
							<text>扣除0%</text>
							<text>¥0.00</text>
						</view>
					</view>
					<view class="item">
						<view class="top">
							<text>预计退款</text>
							<text>￥{{price}}</text>
						</view>
					</view>

				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				feeShow: false,

			}
		},
		methods: {
			close2() {
				this.$set(this, 'feeShow', false);
			},
			btnSail() {
				this.$emit('confirmCancel')
			}
		},
		props: {
			btnName: String,
			priceName: String,
			price: Number
		},
		watch: {

		}

	}
</script>

<style scoped lang="scss">
	.operation {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		background-color: #fff;
		height: 112rpx;
		position: fixed;
		bottom: 0;
		width: 100%;
		z-index: 10;
		box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.06);

		.left {
			color: #FF4141;
			font-size: 24rpx;
			position: relative;

			text {
				vertical-align: middle;
				font-size: 24rpx;
			}

			text:nth-child(1) {
				color: #666;
				margin-right: 16rpx;
			}

			// text:nth-child(2) {
				

			// }

			text:nth-child(3) {
				font-weight: bold;
				font-size: 48rpx;
				color: #FF4141;
			}

			text:nth-child(4) {
				position: absolute;
				font-size: 24rpx;
				color: #AAA;
				bottom: -16rpx;
				left: 0;
			}
		}

		.right {
			display: flex;
			min-width: 200rpx;

			text {
				width: 220rpx;
				height: 80rpx;
				text-align: center;
				line-height: 80rpx;
				color: #fff;
				border-radius: 40rpx;
				margin-left: 24rpx;
				font-size: 32rpx;
				background: #007A69;
			}
		}

	}

	// 费用明细
	.feeDetail {
		background-color: #fff;
		border-radius: 24rpx 24rpx 0 0;
		height: 600rpx;
		overflow: auto;
		padding: 48rpx 24rpx;
		border-bottom: 1px solid #eee;

		.tit {
			display: flex;
			margin-bottom: 48rpx;
			font-weight: bold;

			text {
				font-size: 36rpx;
				color: #333;
				width: 92%;
				text-align: center;
			}
		}

		.list {
			.item {
				margin-bottom: 56rpx;

				.top {
					width: 100%;
					display: flex;
					justify-content: space-between;
					font-size: 32rpx;
					color: #333333;
					font-weight: bold;
					margin-bottom: 32rpx;
				}

				.bottom {
					color: #777;
					font-size: 30rpx;
					display: flex;
					justify-content: space-between;
				}

				.price {
					color: #FF4141;
				}
			}
		}

	}
</style>